package com.example.zkfx

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.zkfx.room.Score

class ScoreAdapter:BaseQuickAdapter<Score,BaseViewHolder>(R.layout.item) {
    override fun convert(holder: BaseViewHolder, item: Score) {
        holder.setText(R.id.time,item.time)
        if(item.type==0){
            holder.setText(R.id.name,"签到积分")
            holder.setText(R.id.num,"+${item.num}")
        }else{
            holder.setText(R.id.name,"兑换好物")
            holder.setText(R.id.num,"${item.num}")
        }
    }
}